set more off
set matsize 800

log using sept05_sum.log, replace

use prdescent2005
keep if yob >= 1914 & yob <= 1963
drop if cenyr == 1970
keep if bornpr
keep if speakeng ~= .

replace yrssch_1990 = yrssch if cenyr == 1990 & liveinus

gen yrssch_all = .
replace yrssch_all = yrssch_1990 if cenyr == 1990
replace yrssch_all = 0 if yrssch == 0 & cenyr == 1980
replace yrssch_all = 3 if (yrssch >= 1 & yrssch <= 4) & cenyr == 1980
replace yrssch_all = 7 if (yrssch >= 5 & yrssch <= 8) & cenyr == 1980
replace yrssch_all = yrssch if (yrssch >= 9 & yrssch <= 12) & cenyr == 1980
replace yrssch_all = 14 if (yrssch >= 13 & yrssch <= 15) & cenyr == 1980
replace yrssch_all = yrssch if yrssch == 16 & cenyr == 1980
replace yrssch_all = 18 if yrssch > 16 

gen cohcat = .
replace cohcat = 1 if yob >= 1914 & yob <= 1923
replace cohcat = 2 if yob >= 1924 & yob <= 1933
replace cohcat = 3 if yob >= 1934 & yob <= 1943
replace cohcat = 4 if yob >= 1944 & yob <= 1953
replace cohcat = 5 if yob >= 1954 & yob <= 1963


sort cohcat edmore4

gen sumnoschool = yrssch_all == 0
gen sum1to4school = yrssch_all == 3
gen sum5to8school = yrssch_all == 7
gen sum9plusschool = yrssch_all > 7


by cohcat: sum pot_treat actual_treat speakeng engwell age female yrssch sumnoschool-sum9plusschool liveinus
by cohcat edmore4: sum pot_treat actual_treat speakeng engwell age female yrssch sumnoschool-sum9plusschool liveinus


log close




